<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link type="text/css" rel="stylesheet" th:href="@{/css/main.css}" />
</head>
<body class="goodsBody">
<div class="tohome">
    <a th:href="@{'/wujin/list'}">回到主页</a>
</div>
<form action="/assist/upload" th:action="@{/assist/upload}" method="POST" enctype="multipart/form-data">

    商品ID：
    <input type="text" name="goods_id" th:value="${imageModel.goods_id}" readonly="readonly">
    <br>
    <br>
    图片类型：
    <select name="image_type">
        <option value="01">主图</option>
        <option value="02">轮播图</option>
        <option value="03">详情图</option>
    </select>
    <br>
    <br>
    选择图片:<input type="file" name="file" accept="image/*" />
    <br>
    <br>
    <input type="submit" value="提交" >
</form>

<br>
<br>
<p3>01主图  02轮播图  03详细图</p3>


<table border="1">
    <thead>
    <tr>
        <td>商品ID</td>
        <td>图片ID</td>
        <td>图片路径</td>
        <td>图片类型</td>
    </tr>
    </thead>
    <tbody>
    <tr th:if="${imageModel.imageList.size()} eq 0">
        <td colspan="3">没有商品颜色信息！</td>
    </tr>
    <tr th:each="img:${imageModel.imageList}">
        <td th:text="${img.goods_id}"></td>
        <td th:text="${img.image_id}"></td>
        <td th:text="${img.image_path}"></td>
        <td th:text="${img.image_type}"></td>

        <td >
            <a th:href="@{'/assist/deleteimg?image_id='+${img.image_id}+'&goods_id='+${img.goods_id}}">删除</a>

        </td>

    </tr>
    </tbody>
</table>

</body>
</html>